# Adogs
# 时间: 2021/7/30 13:50
import pygame
from actor.action_character import ActionImageCharater


class WelcomeSprite(pygame.sprite.Sprite):
    def __init__(self, x: int, y: int):
        super(WelcomeSprite, self).__init__()
        self.action = ActionImageCharater("resources/picture/welcome/%d-1.png", 9, True)
        self.pos_x = x
        self.pos_y = y

    def draw(self, surface: pygame.surface, x: int, y: int):
        current_img = self.action.get_image()
        surface.blit(current_img, (self.pos_x-x, self.pos_y-y))

    def run(self, down_flag, key_list):
        if self.pos_x < 1200:
            self.pos_x += 10
